home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Full / Paragon Drive Backup 9 / DB90_SE_x64.msi / Data1.cab / _95C5A5766B4F459CB14527CF2EAC6EDD < prev    next >
Extensible Markup Language  |  2008-06-28  |  5KB  |  146 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <xsl:stylesheet 
  4.   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  5.   xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  6.   version="1.0">
  7.  
  8. <xsl:template name="PropCell">
  9.   <xsl:param name="PropName"/>
  10.   <xsl:param name="CheckNull"/>
  11.   <xsl:param name="CheckFSName"/>
  12.   <xsl:param name="WordWrap" select="0"/>
  13.  
  14.   <xsl:variable name="FSName" select="PropertyBag/Property[@name='PROPID_HDM_INTERNALFSNAME']"/>
  15.   <xsl:variable 
  16.     name="HasFSProps" 
  17.     select="$FSName != 'UNKNOWN' and 
  18.           $FSName != 'INVALID' and 
  19.           $FSName != 'FREE' and 
  20.           $FSName != 'NOTFORMATTED' and 
  21.           $FSName != 'LSWAP' and
  22.           $FSName != 'LSWAP2' and
  23.           $FSName != 'BACKUPCAPSULE'"
  24.     />
  25.  
  26.   <xsl:if test="PropertyBag/Property[@name=$PropName] and 
  27.     (not(boolean($CheckNull)) or number(PropertyBag/Property[@name=$PropName]) != 0) and
  28.     (not(boolean($CheckFSName)) or boolean($HasFSProps))">
  29.     <tr>
  30.       <td align="right">
  31.         <nobr><b><xsl:value-of select="ImplicitCommands/Property[@propname=$PropName]"/></b></nobr>
  32.       </td>
  33.       <xsl:choose>
  34.         <xsl:when test="ImplicitCommands/Property[@propname=$PropName]/@action">
  35.           <td width="100%">
  36.             <a>
  37.               <xsl:attribute name="href">
  38.                 <xsl:value-of select="ImplicitCommands/Property[@propname=$PropName]/@action"/>
  39.               </xsl:attribute>
  40.               <nobr><xsl:value-of select="PropertyBag/Property[@name=$PropName]"/></nobr>
  41.             </a>
  42.           </td>
  43.         </xsl:when>      
  44.         <xsl:otherwise>
  45.           <td width="100%">
  46.             <xsl:choose>
  47.               <xsl:when test="number($WordWrap) != 0"><xsl:value-of select="PropertyBag/Property[@name=$PropName]"/></xsl:when>
  48.               <xsl:otherwise><nobr><xsl:value-of select="PropertyBag/Property[@name=$PropName]"/></nobr></xsl:otherwise>
  49.             </xsl:choose>
  50.           </td>
  51.         </xsl:otherwise>
  52.       </xsl:choose>
  53.     </tr>
  54.   </xsl:if>
  55. </xsl:template>
  56.  
  57. <xsl:template name="CommandGroup">
  58.   <xsl:param name="GroupNode"/>
  59.  
  60.   <td width="50%" valign="top">
  61.     <h3><nobr><xsl:value-of select="$GroupNode/Text"/></nobr></h3><br/>
  62.           
  63.     <table border="0" >
  64.       <xsl:for-each select="$GroupNode/Command">
  65.         <tr>
  66.           <td valign="middle">
  67.             <xsl:if test="Image">
  68.               <img width="16" height="16"><xsl:attribute name="src"><xsl:value-of select="Image"/></xsl:attribute></img>
  69.             </xsl:if>
  70.           </td>
  71.           <td align="left" valign="middle" width="100%">
  72.             <nobr><a>
  73.               <xsl:attribute name="href"><xsl:value-of select="Action"/></xsl:attribute>
  74.               <xsl:value-of select="Text"/>
  75.             </a>
  76.             </nobr>
  77.           </td>
  78.         </tr>
  79.       </xsl:for-each>
  80.     </table>
  81.   </td>
  82. </xsl:template>
  83.  
  84. <xsl:template name="CommandTable">
  85.   <!-- Command hyperlinks -->
  86.   <table border="0">
  87.     <xsl:choose>
  88.         <xsl:when test="count(Commands/CmdGroup) != 0">
  89.         <xsl:for-each select="Commands/CmdGroup">
  90.           <xsl:if test="(position() mod 3) = 1">
  91.             <tr>
  92.  
  93.                 <xsl:call-template name="CommandGroup">
  94.                 <xsl:with-param name="GroupNode" select="."/>
  95.                             </xsl:call-template>
  96.  
  97.                 <xsl:call-template name="CommandGroup">
  98.                 <xsl:with-param name="GroupNode" select="following-sibling::CmdGroup[position()=1]"/>
  99.                             </xsl:call-template>
  100.  
  101.                 <xsl:call-template name="CommandGroup">
  102.                 <xsl:with-param name="GroupNode" select="following-sibling::CmdGroup[position()=2]"/>
  103.                             </xsl:call-template>
  104.  
  105.               <td width="100%"> </td>
  106.             </tr>
  107.                       
  108.             <tr><td colspan="3"><img src="hline_gray"/></td></tr>
  109.           
  110.  
  111.           </xsl:if>
  112.         </xsl:for-each>
  113.             </xsl:when>
  114.   
  115.           <xsl:otherwise>
  116.         <xsl:for-each select="Commands/Command">
  117.           <tr>
  118.             <td valign="center">
  119.               <xsl:choose>
  120.                 <xsl:when test="Image">
  121.                   <img><xsl:attribute name="src"><xsl:value-of select="Image"/></xsl:attribute></img>
  122.                 </xsl:when>
  123.  
  124.                               <xsl:otherwise>
  125.                       <img src="generic_action"/>
  126.                               </xsl:otherwise>
  127.               </xsl:choose>
  128.             </td>
  129.             
  130.             <td width="100%">
  131.               <a>
  132.                 <xsl:attribute name="href"><xsl:value-of select="Action"/></xsl:attribute>
  133.                 <b><xsl:value-of select="Text"/></b>
  134.               </a>
  135.               <br/>
  136.               <xsl:value-of select="TipText" disable-output-escaping="yes"/>
  137.             </td>
  138.           </tr>
  139.         </xsl:for-each>
  140.           </xsl:otherwise>
  141.     </xsl:choose>
  142.   </table>
  143. </xsl:template>
  144.  
  145. </xsl:stylesheet>
  146.